/**
 * RadiositySolution.cpp
 *
 * Author:
 *   Chris Herbison
 *
 * Description:
 *   Class that samples radiosity data to use for scene illumination.
 */

#include "RadiositySolution.h"
#include "Rectangle.h"
#include "Ray.h"
#include <cmath>

RadiositySolution::RadiositySolution(){
}

void RadiositySolution::calculateRadienceExitances(){
}

MyColor RadiositySolution::illuminate(IntersectData id, Object* originalIntersect, WorldData wd, int index, int depth){
	MyColor result(0,0,0,1);
	Rectangle* surface = (Rectangle*)originalIntersect;

	Patch* intersectingPatch = ((Rectangle*)originalIntersect)->findCorrespondingPatch(id.pos);

	return intersectingPatch->illuminance;
}